SRC = subdir.c compare.c
OBJ = $(SRC:.c=.o)

all: subdir compare

subdir: subdir.o ../librid_hex.a
	@gcc -g -o subdir subdir.o ../librid_hex.a -lrid -lbsd

compare: compare.o ../librid_hex.a
	@gcc -g -o compare compare.o ../librid_hex.a -lrid -lbsd

.c.o:
	@gcc -g -c $<

../librid_hex.a:
	@(cd .. && make)

clean:
	@rm -f subdir compare $(OBJ)
